package com.max.back.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.max.back.demo.dao.DrugTypeDao;
import com.max.back.demo.entity.DrugType;
import com.max.back.demo.service.DrugTypeSer;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 *  服务实现类
 */
@Service
public class DrugTypeSerImpl extends ServiceImpl<DrugTypeDao, DrugType> implements DrugTypeSer {
    @Override
    public boolean checkAndInsert(DrugType drugType) {
        return save(drugType);
    }

    @Override
    public List<DrugType> findall(String id, String name) {
        return baseMapper.find(id, name);
    }

    @Override
    public List<DrugType> getjx(String spci) {
        return query().eq("spci", spci).list();
    }
}
